﻿<Window x:Class="WpfApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="50" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Menu Grid.Row="0" >
            <MenuItem AllowDrop="True" Header="绝杀一码" Click="MenuItem_Click_1"></MenuItem>
            
        </Menu>
        
        <StackPanel Grid.Row="1"  HorizontalAlignment="Left" VerticalAlignment="Bottom"  Orientation="Horizontal" >
            <TextBlock Text="{Binding Model.TestString}" Height="28" TextWrapping="WrapWithOverflow" ></TextBlock>
            <Button Command="{Binding CopyCmd}" Height="23" Width="100">Copy</Button>
            <Button Command="{Binding CalculateKillCodeCmd}" Height="23" Width="100">生成杀码数据</Button>
        </StackPanel>
        <DataGrid Grid.Row="2" Name="LotteryHistoryGird" AutoGenerateColumns="False" >
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="操作" Width="40">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox></CheckBox>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Header="期数" Width="80" Binding="{Binding IssueNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <DataGridTextColumn Header="试机号" Width="80" Binding="{Binding TestingNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <DataGridTextColumn Header="开奖号" Width="80" Binding="{Binding LotteryNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <DataGridTextColumn Header="日期" Width="80" Binding="{Binding IssueDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
            </DataGrid.Columns>
        </DataGrid>

    </Grid>
</Window>
